#ifndef OBJECTPATH_H
#define OBJECTPATH_H

#include "ObjectId.h"

class QUINCE_CORE_EXPORT ObjectPath : public vector<ObjectId>
{
public:
    ObjectPath() = default;
    ObjectPath(const string &s);
    ObjectPath(const_iterator it1, const_iterator it2);
    explicit ObjectPath(const ObjectId &id);

    ObjectPath operator + (const ObjectId &id) const;
    ObjectPath operator + (const ObjectPath &other) const;
    ObjectPath & operator += (const ObjectId &id);
    ObjectPath & operator += (const ObjectPath &other);
    operator string() const { return toString(); }

    string toString() const;
    bool startsWith(const ObjectPath &prefix) const;
    bool endsWith(const ObjectPath &postfix) const;
    ObjectPath slice(int start) const { return slice(start, size()); }
    ObjectPath slice(int start, int end) const;
};

#endif // OBJECTPATH_H
